Skip to content

feat: add timescaledb-oss container image#73

Open
shusaan wants to merge 16 commits into
cloudnative-pg:mainfrom
shusaan:timescaledb
Open

feat: add timescaledb-oss container image#73
shusaan wants to merge 16 commits into
cloudnative-pg:mainfrom
shusaan:timescaledb

Conversation

@shusaan
Copy link
Copy Markdown
Contributor

@shusaan shusaan commented Jan 11, 2026

Add a scratch-based container image for TimescaleDB, sourced from the PGDG postgresql-18-timescaledb Debian +dfsg package. The +dfsg repackage strips the TSL-licensed components, leaving only the Apache 2.0 OSS subset — hence the -oss image name. Includes the shared chainsaw smoke tests plus a hypertable-specific test exercising create_hypertable().

Closes #58

@shusaan shusaan requested review from a team and NiccoloFei as code owners January 11, 2026 13:37
@gbartolini
Copy link
Copy Markdown
Contributor

Hi @shusaan, can you please resubmit the PR by following the scaffolding instructions and then the local testing part in the BUILD.md file? Thanks.

@gbartolini
Copy link
Copy Markdown
Contributor

Hi @shusaan, can you please update your PR using the new scaffolding procedure and making sure you test it? Also, please use the official PGDG packages, as they are available there (we prefer the Postgres official source).

Finally, can you please write some smoke tests that verify that Timescale is installed? (look at the PostGIS extension for examples).

@shusaan
Copy link
Copy Markdown
Contributor Author

shusaan commented Feb 15, 2026

Hi @gbartolini,

I've investigated using PGDG packages for TimescaleDB as requested.

The issue: The PGDG package postgresql-18-timescaledb contains both Apache 2.0 and TSL (Timescale License) code. There is no Apache 2.0-only package available in the official PGDG repository.

I verified this by running:

apt-cache policy postgresql-18-timescaledb    # Available in PGDG
apt-cache policy timescaledb-2-oss-postgresql-18  # Not found

The Apache 2.0-only packages (timescaledb-2-oss-postgresql-*) are only available from TimescaleDB's own repository (packagecloud.io), not from PGDG.

Options:

Keep using TimescaleDB's repository with the OSS package (current approach). Here is discussion about TimescaleDB License.

What do you suggest?

@gugu
Copy link
Copy Markdown

gugu commented Feb 17, 2026

postgresql-18-timescaledb is OSS version. I haven't found TSL version in PGDG APT, but found it in a separate repo for redhat-based distros: https://download.postgresql.org/pub/repos/yum/non-free/18/redhat/rhel-10-x86_64/

Also, I am not sure TSL license allows such manipulations, so it should be a political decision about inclusion of TSL version.

@shusaan
Copy link
Copy Markdown
Contributor Author

shusaan commented Feb 18, 2026

Hi @gbartolini I've updated the PR as per the requirements. Please let me know if any further changes are needed.
Thank You

@gbartolini
Copy link
Copy Markdown
Contributor

Hi @shusaan I will, thanks for the contribution.

@gbartolini
Copy link
Copy Markdown
Contributor

I have opened a support ticket within the CNCF to get legal advice before merging. Thanks for your patience.

@gbartolini
Copy link
Copy Markdown
Contributor

@shusaan, regarding your PR, I have made some minor changes, primarily formatting but also renaming the extension (not on the SQL level though). I have renamed it timescaledb-oss, which will also be the image's tag. I have added you as a CODEOWNER for that folder.

@gbartolini
Copy link
Copy Markdown
Contributor

In the meantime, I confirm what @gugu was saying.

Start a container:

docker run -ti --rm --user 0 ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie

Then:

apt update
apt show postgresql-18-timescaledb

I get this:

Package: postgresql-18-timescaledb
Version: 2.25.1+dfsg-1.pgdg13+1
Priority: optional
Section: database
Source: timescaledb
Maintainer: Debian PostgreSQL Maintainers <[email protected]>
Installed-Size: 14.3 MB
Depends: postgresql-18, libc6 (>= 2.38)
Homepage: https://github.com/timescale/timescaledb
Download-Size: 383 kB
APT-Sources: https://apt.postgresql.org/pub/repos/apt trixie-pgdg/main arm64 Packages
Description: time-series SQL database optimized for fast ingest and complex queries
 TimescaleDB is an open-source database designed to make SQL scalable for
 time-series data. It is engineered up from PostgreSQL and packaged as a
 PostgreSQL extension, providing automatic partitioning across time and space
 (partitioning key), as well as full SQL support.
 .
 This package contains the Apache-licensed version of timescaledb.

The last line says: This package contains the Apache-licensed version of timescaledb.

I proceeded installing the package and checked the copyright file, which is very clear:

cat /usr/share/doc/postgresql-18-timescaledb/copyright

Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: timescaledb
Source: https://github.com/timescale/timescaledb
Files-Excluded:
 tsl
 scripts/c_license_header-timescale.h
 scripts/license_tsl.spec
 scripts/sql_license_tsl.sql

Files: *
Copyright:
 Copyright (c) 2017-2022  Timescale, Inc. All Rights Reserved.
 Copyright (c) 2016-2017  440 Labs, Inc. dba Timescale. All Rights Reserved.
 Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
 Portions Copyright (c) 1994, The Regents of the University of California
License: Apache-2.0 and PostgreSQL
 Source code in this repository is variously licensed under the Apache License
 Version 2.0, an Apache compatible license, or the Timescale License.
 .
 All source code should have information at the beginning of its respective file
 which specifies its licensing information.
 .
 * Outside of the "tsl" directory, source code in a given file is licensed
   under the Apache License Version 2.0, unless otherwise noted (e.g., an
   Apache-compatible license).
 .
 * Within the "tsl" folder, source code in a given file is licensed under the
   Timescale License, unless otherwise noted.
 .
   The tsl folder has been removed when creating the +dfsg orig tarballs for
   Debian. No tsl-licensed code remains.
 .
 Certain files in this code base have been modified and/or copied,
 either partially or wholely, from source code from the PostgreSQL
 database management system

License: Apache-2.0
 On Debian systems, the Apache 2.0 license is located in
 /usr/share/common-licenses/Apache-2.0.

License: PostgreSQL
 Permission to use, copy, modify, and distribute this software and its
 documentation for any purpose, without fee, and without a written agreement
 is hereby granted, provided that the above copyright notice and this
 paragraph and the following two paragraphs appear in all copies.
 .
 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
 LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
 DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 .
 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
 PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

As a result, I would prefer to stick with the PGDG package @shusaan. Do you think you can do that? (please pull my changes first, thanks).

@shusaan
Copy link
Copy Markdown
Contributor Author

shusaan commented Feb 20, 2026

In the meantime, I confirm what @gugu was saying.

Start a container:

docker run -ti --rm --user 0 ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie

Then:

apt update
apt show postgresql-18-timescaledb

I get this:

Package: postgresql-18-timescaledb
Version: 2.25.1+dfsg-1.pgdg13+1
Priority: optional
Section: database
Source: timescaledb
Maintainer: Debian PostgreSQL Maintainers <[email protected]>
Installed-Size: 14.3 MB
Depends: postgresql-18, libc6 (>= 2.38)
Homepage: https://github.com/timescale/timescaledb
Download-Size: 383 kB
APT-Sources: https://apt.postgresql.org/pub/repos/apt trixie-pgdg/main arm64 Packages
Description: time-series SQL database optimized for fast ingest and complex queries
 TimescaleDB is an open-source database designed to make SQL scalable for
 time-series data. It is engineered up from PostgreSQL and packaged as a
 PostgreSQL extension, providing automatic partitioning across time and space
 (partitioning key), as well as full SQL support.
 .
 This package contains the Apache-licensed version of timescaledb.

The last line says: This package contains the Apache-licensed version of timescaledb.

I proceeded installing the package and checked the copyright file, which is very clear:

cat /usr/share/doc/postgresql-18-timescaledb/copyright

Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: timescaledb
Source: https://github.com/timescale/timescaledb
Files-Excluded:
 tsl
 scripts/c_license_header-timescale.h
 scripts/license_tsl.spec
 scripts/sql_license_tsl.sql

Files: *
Copyright:
 Copyright (c) 2017-2022  Timescale, Inc. All Rights Reserved.
 Copyright (c) 2016-2017  440 Labs, Inc. dba Timescale. All Rights Reserved.
 Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
 Portions Copyright (c) 1994, The Regents of the University of California
License: Apache-2.0 and PostgreSQL
 Source code in this repository is variously licensed under the Apache License
 Version 2.0, an Apache compatible license, or the Timescale License.
 .
 All source code should have information at the beginning of its respective file
 which specifies its licensing information.
 .
 * Outside of the "tsl" directory, source code in a given file is licensed
   under the Apache License Version 2.0, unless otherwise noted (e.g., an
   Apache-compatible license).
 .
 * Within the "tsl" folder, source code in a given file is licensed under the
   Timescale License, unless otherwise noted.
 .
   The tsl folder has been removed when creating the +dfsg orig tarballs for
   Debian. No tsl-licensed code remains.
 .
 Certain files in this code base have been modified and/or copied,
 either partially or wholely, from source code from the PostgreSQL
 database management system

License: Apache-2.0
 On Debian systems, the Apache 2.0 license is located in
 /usr/share/common-licenses/Apache-2.0.

License: PostgreSQL
 Permission to use, copy, modify, and distribute this software and its
 documentation for any purpose, without fee, and without a written agreement
 is hereby granted, provided that the above copyright notice and this
 paragraph and the following two paragraphs appear in all copies.
 .
 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
 LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
 DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 .
 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
 PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

As a result, I would prefer to stick with the PGDG package @shusaan. Do you think you can do that? (please pull my changes first, thanks).

@gbartolini I have updated, please check

@gbartolini gbartolini force-pushed the timescaledb branch 2 times, most recently from 7e2de6b to cc036e4 Compare February 26, 2026 00:31
@simonoff
Copy link
Copy Markdown

simonoff commented Mar 2, 2026

hey guys! @shusaan thank you for your great work!
@gbartolini do you need a testers? As we building now a custom images, and willing to migrate to such extension container.

@logaritmisk
Copy link
Copy Markdown

Is there anything blocking this PR? I would love to test this out :)

@gbartolini
Copy link
Copy Markdown
Contributor

Is there anything blocking this PR? I would love to test this out :)

I have personally completed all the licensing checks and, as far as I am concerned, everything looks fine. However, I am waiting for an official response from the CNCF legal team, as we need to comply with their distribution policies. It is a complex matter. Hopefully, it is now a matter of days.

You can already help with testing it. Look at the CONTRIBUTING_NEW_EXTENSION.md file. ;)

@gbartolini
Copy link
Copy Markdown
Contributor

Good news. Read #213

shusaan and others added 6 commits May 23, 2026 22:19
Signed-off-by: Husn E Rabbi <[email protected]>
Signed-off-by: Husn E Rabbi <[email protected]>
Includes smoke tests for hypertable functionality and uses Apache 2.0-only packages from TimescaleDB repository

Signed-off-by: Husn E Rabbi <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
shusaan and others added 8 commits May 23, 2026 22:19
Signed-off-by: Gabriele Bartolini <[email protected]>
Enforce the given EXT_VERSION when building the image.
Fix the license directory.
Update documentation and smoke tests.

Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
@gbartolini gbartolini changed the title Add TimescaleDB extension support feat: add timescaledb-oss container image May 23, 2026
@gbartolini
Copy link
Copy Markdown
Contributor

Please other maintainers review this. I am good with it, but I prefer another pair of eyes. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Extension]: TimescaleDB

6 participants